package cn.edu.zjicm.wordsnet_d.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import cn.edu.zjicm.wordsnet_d.R;
import cn.edu.zjicm.wordsnet_d.activity.base.WordBaseActivity;

public class HelpCenterAnswerActivity extends WordBaseActivity {

	private TextView questionTv, anwserTv;
	private Button askBtn, konwBtn;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_help_center_answer);
		setTitleBarStyle(WordBaseActivity.TITLE_BAR_STYLE_BACK_BUTTON);
		setTitleText("问题详情");

		questionTv = (TextView) findViewById(R.id.question_tv);
		anwserTv = (TextView) findViewById(R.id.answer_tv);
		askBtn = (Button) findViewById(R.id.ask_btn);
		konwBtn = (Button) findViewById(R.id.konw_btn);

		questionTv.setText(getIntent().getStringExtra("question"));
		anwserTv.setText(getIntent().getStringExtra("answer"));

		findViewById(R.id.regular_hint).setVisibility(View.VISIBLE);
		
		askBtn.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent(HelpCenterAnswerActivity.this, FeedBackForUMengActivity.class));
				if(HelpCenterActivity.mContext!=null){
					HelpCenterActivity.mContext.toFinish();
				}
				finish();
			}
		});
		konwBtn.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				if(HelpCenterActivity.mContext!=null){
					HelpCenterActivity.mContext.toFinish();
				}
				finish();
			}
		});
	}
}
